package org.ansel.webnodb.demo.beans;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "demoperson")//批量注入
public class Demoperson {
	/* Springboot默认可以识别普通类型参数及其数组参数，但map、list等类型的参数是复杂类，只能定义配置类进行注入。
	 * 两种注入方式二选一。@ConfigurationProperties是本类中所有变量批量注入，或者在某个变量上设置@Value。
	 */
	private Set<Map<String, Object>> pets;
	private String name;
	private Integer age;
	private Map<String, Object> map;
	private String[] children;
	private List<String> parents;
	private List<String> list;
	public Set<Map<String, Object>> getPets() {
		return pets;
	}
	public void setPets(Set<Map<String, Object>> pets) {
		this.pets = pets;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public Map<String, Object> getMap() {
		return map;
	}
	public void setMap(Map<String, Object> map) {
		this.map = map;
	}
	public String[] getChildren() {
		return children;
	}
	public void setChildren(String[] children) {
		this.children = children;
	}
	public List<String> getParents() {
		return parents;
	}
	public void setParents(List<String> parents) {
		this.parents = parents;
	}
	public List<String> getList() {
		return list;
	}
	public void setList(List<String> list) {
		this.list = list;
	}
}
